﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Mobile.master" AutoEventWireup="true"
    CodeFile="proposal-form.aspx.cs" Inherits="car_insurance_proposal_form" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="fix-header">
        <div class="header">
            <a href="../home.aspx">
                <div class="logo-text">
                    GluayGluay
                </div>
            </a>
        </div>
        <div id="new-code">
            <div class="new-code">
                <asp:ImageButton runat="server" ID="ibtnBack" AlternateText="" ImageUrl="" width="81px" height="29px" OnClick="ibtnBack_Click" />
            </div>
        </div>
    </div>
    <div class="container">
        <div class="big-title-3">
            <asp:Label ID="lblApplicationTitle" runat="server" Text=""></asp:Label>
        </div>
        <div style="padding: 10px 0px 5px 10px;">
            <asp:Label ID="lblDOB" runat="server" Text=""></asp:Label></div>
        <asp:DropDownList ID="ddlDay" runat="server" CssClass="your-detail-fields-2" Width="75">
        </asp:DropDownList>
        <asp:DropDownList ID="ddlMonth" runat="server" CssClass="your-detail-fields-2" Width="95">
            <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Month%>"></asp:ListItem>
            <asp:ListItem Value="1" Text="<%$ Resources:MonthResource,January%>" />
            <asp:ListItem Value="2" Text="<%$ Resources:MonthResource,February%>" />
            <asp:ListItem Value="3" Text="<%$ Resources:MonthResource,March%>" />
            <asp:ListItem Value="4" Text="<%$ Resources:MonthResource,April%>" />
            <asp:ListItem Value="5" Text="<%$ Resources:MonthResource,May%>" />
            <asp:ListItem Value="6" Text="<%$ Resources:MonthResource,June%>" />
            <asp:ListItem Value="7" Text="<%$ Resources:MonthResource,July%>" />
            <asp:ListItem Value="8" Text="<%$ Resources:MonthResource,August%>" />
            <asp:ListItem Value="9" Text="<%$ Resources:MonthResource,September%>" />
            <asp:ListItem Value="10" Text="<%$ Resources:MonthResource,October%>" />
            <asp:ListItem Value="11" Text="<%$ Resources:MonthResource,November%>" />
            <asp:ListItem Value="12" Text="<%$ Resources:MonthResource,December%>" />
        </asp:DropDownList>
        <asp:DropDownList ID="ddlYear" runat="server" CssClass="your-detail-fields-2" Width="80">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="rfvYear" ControlToValidate="ddlYear" runat="server"
            ValidationGroup="proposal" CssClass="validationError" ErrorMessage="" InitialValue="-1"></asp:RequiredFieldValidator>
        <asp:RequiredFieldValidator ID="rfvMonth" ControlToValidate="ddlMonth" runat="server"
            ValidationGroup="proposal" CssClass="validationError" ErrorMessage="" InitialValue="-1"></asp:RequiredFieldValidator>
        <asp:RequiredFieldValidator ID="rfvDay" ControlToValidate="ddlDay" runat="server"
            ValidationGroup="proposal" CssClass="validationError" ErrorMessage="" InitialValue="-1"></asp:RequiredFieldValidator>
        <div style="width: 100px; float: left; padding-top: 10px; padding-left: 10px;">
            <asp:Label ID="lblPaymentType" runat="server" Text=""></asp:Label>
        </div>
        <div style="width: 100px; float: left;">
            <asp:DropDownList ID="ddlPaymentType" runat="server" CssClass="your-detail-fields-2"
                Width="160">
                <asp:ListItem Value="BankIn" Text="<%$ Resources:CarMenu,BankIn%>" />
                <asp:ListItem Value="CreditCard" Text="<%$ Resources:CarMenu,CreditCard%>" />
                <asp:ListItem Value="Seven" Text="7/11" />
                <asp:ListItem Value="Tesco" Text="<%$ Resources:CarMenu,Tesco%>" />
                <asp:ListItem Value="TrueMoney" Text="<%$ Resources:CarMenu,TrueMoney%>" />
            </asp:DropDownList>
        </div>
        <asp:RequiredFieldValidator ID="rfvUserName" runat="server" CssClass="validationError"
            ValidationGroup="proposal" ErrorMessage="" Text="" ControlToValidate="txtUserName"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="revUserName" runat="server" ValidationGroup="proposal"
            ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" CssClass="validationError"
            ControlToValidate="txtUserName" ErrorMessage=""></asp:RegularExpressionValidator>
        <html5:TextInput ID="txtUserName" MaxLength="50" runat="server" CssClass="your-detail-fields-1"
            Text="<%$Resources:CarMenu,YourName%>"></html5:TextInput>
        <asp:RegularExpressionValidator ID="rfvUserEmail" Text="" CssClass="validationError"
            runat="server" ValidationGroup="proposal" ErrorMessage="" ControlToValidate="txtUserEmail"
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="revUserEmail" runat="server" Text="" CssClass="validationError"
            ValidationGroup="proposal" ErrorMessage="" ControlToValidate="txtUserEmail" Display="Dynamic"></asp:RequiredFieldValidator>
        <html5:EmailInput ID="txtUserEmail" runat="server" MaxLength="80" CssClass="your-detail-fields-1"
            Text="<%$Resources:CarInsurance,YourEmail%>"></html5:EmailInput>
        <asp:RequiredFieldValidator ID="rfvUserMobile" runat="server" CssClass="validationError"
            ValidationGroup="proposal" ErrorMessage="" Text="" ControlToValidate="txtUserMobile"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="revUserMobile" runat="server" ValidationGroup="proposal"
            ValidationExpression="0[8-9]\d{8}" ControlToValidate="txtUserMobile" CssClass="validationError"
            ErrorMessage=""></asp:RegularExpressionValidator>
        <html5:PhoneInput ID="txtUserMobile" runat="server" CssClass="your-detail-fields-1"
            MaxLength="10" Text="<%$Resources:CarMenu,MobileSample%>"></html5:PhoneInput>
        <asp:UpdatePanel ID="upnlForm" runat="server">
            <ContentTemplate>
                <div class="Buy-Now-btn-link">
                    <asp:Button runat="server" ID="btnSubmit" Text="<%$Resources:CarMenu,BuyNow%>" CssClass="Buy-Now-btn"
                        Height="45px" OnClick="btnSubmit_Click" ValidationGroup="proposal" OnClientClick="LoadValidationErrorCss()" />
                </div>
                <div>
                    <asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red"></asp:Label>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress AssociatedUpdatePanelID="upnlForm" ID="updateProgress3" DynamicLayout="false"
            DisplayAfter="0" runat="server">
            <ProgressTemplate>
                <div style="position: absolute;">
                    <img alt="Loading" src="../images/loader/loader_main.gif" width="66" height="66" style="padding: 0px 150px 50px 110px;" />
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div id="call-btn">
            <a href="tel:022688222">
                <img src="../images/call-btn.png" width="227" height="47" alt=""></a></div>
        <div style="display: none;">
            <asp:HiddenField ID="hdnQuoteId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnCarId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnPolicyId" runat="server" Value="0" />
        </div>
        <input id="inputLang" value="" style="display: none;" />
    </div>

    <script type="text/javascript">
        function RemoveSpace(c) {
            c.value = c.value.split(' ').join('')
        }

        function DefaultName(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your name ...";
                }
                else {
                    TextBoxControl.value = "ชื่อของคุณ  ...";
                }
            }
        }

        function DefaultEmail(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your E-mail address ...";
                }
                else {
                    TextBoxControl.value = "อีเมล์";
                }
            }
        }

        function DefaultPhone(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Example: 0893998209";
                }
                else {
                    TextBoxControl.value = "ตัวอย่าง 0893998209";
                }
            }
        }

        function ClearText(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value == "Your name ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "ชื่อของคุณ  ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Your E-mail address ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }

            if (TextBoxControl.value == "อีเมล์") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Example: 0893998209") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "ตัวอย่าง 0893998209") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
        }
        
    </script>

    <script type="text/javascript">
        function ConfirmGoback() {
            var _retVal = false;

            _retVal = window.confirm('<%=GetGlobalResourceObject("CarMenu", "GoBack")%>');

            if (_retVal) {
                window.onbeforeunload = null;
            }

            return _retVal;
        }
    </script>

</asp:Content>
